package cn.com.dbappsecurity.controller;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import cn.com.dbappsecurity.frame.annotations.Action;
import cn.com.dbappsecurity.frame.annotations.Controller;
import cn.com.dbappsecurity.frame.datamodal.IDataModal;
import cn.com.dbappsecurity.frame.datamodal.TreeDataModal;
import cn.com.dbappsecurity.frame.datamodal.TreeDataModal.MenuItem;
import cn.com.dbappsecurity.service.IMenu;
import cn.com.dbappsecurity.service.impl.MenuImpl;

@Controller("menu")
public class MenuController extends BaseController{
	
	private IMenu menuService = getService(MenuImpl.class);
	
	@Action
	public IDataModal search(HttpServletRequest req)throws Exception{
		List<MenuItem> data = menuService.search(req);
		TreeDataModal moda = new TreeDataModal(data);
		return moda;
	}
	
}
